// 角色菜单表
import { ApiProperty } from '@nestjs/swagger';
import { modelOptions, prop } from '@typegoose/typegoose';

@modelOptions({
  // 自动为每个属性添加时间戳
  schemaOptions: {
    timestamps: true,
  },
})
export class AdminRoleMenu {
  @ApiProperty({ description: '角色id', required: true })
  @prop()
  roleId: number;

  @ApiProperty({ description: '菜单id数组', required: true })
  @prop()
  menus: number[];
}
